const CracoLessPlugin = require('craco-less');
const CracoCSSModules = require('craco-css-modules');
const path = require("path")
const resolve = function (dir) {
    return path.resolve(__dirname, dir)
}
module.exports = {
    webpack: {
        client: {
            warnings: false,
            errors: false
        },
        alias: {
            "@": resolve('src'),
            "cms": resolve('src/cms')
        },
    },
    plugins: [
        {
            plugin: CracoLessPlugin,
            options: {
                lessLoaderOptions: {
                    lessOptions: {
                        modifyVars: { '@primary-color': '#1DA57A' },
                        javascriptEnabled: true,
                    },
                },
            },
        },
        {
            plugin: CracoCSSModules,
        },
    ],
};
